<?php

/**
 * 
 */
class LoginForm extends FormModel {

    public $username_;
    public $password_;
    public $rememberMe_ = false;

    /**
     * @return array validation rules for model attributes.
     */
    public function rules() {
        // NOTE: you should only define rules for those attributes that
        // will receive user inputs.
        return array(
            array('rememberMe_', 'boolean'),
            array('username_, password_', 'length', 'max' => 200),
            array('username_, password_', 'required'),
            array('username_, password_, rememberMe_', 'safe', 'on' => 'login'),
            array('var_', 'ext.validators.BotDetectionValidator'),
        );
    }

    /**
     * @return array customized attribute labels (name=>label)
     */
    public function attributeLabels() {
        return array(
            'username_' => Lang::t('user.login.lbl.username'),
            'password_' => Lang::t('user.login.lbl.password'),
            'rememberMe_' => Lang::t('user.login.lbl.rememberMe'),
        );
    }

}